package demo7;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import javax.crypto.spec.PSource;

public class Demo {
    public static void main(String[] args) {
        System.out.println("正在初始化.....");
        AnnotationConfigApplicationContext context=
                new AnnotationConfigApplicationContext("demo7");

        System.out.println("容器初始化完毕.....");
        Person person=context.getBean(Person.class);
        person.play();
        System.out.println("容器即将关闭.......");
        context.close();
        System.out.println("容器已关闭");
    }
}
